package com.fig.spring;

import com.fig.spring.beans.User;
import com.fig.spring.lookup.GetBeanTest;
import com.fig.spring.replaced.TestChangeMe;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * @Description:
 * @Author: Flynn Vanderboom
 * @Data: 2021/5/7 21:44
 */

public class MayTest {

	public static void main(String[] args) {
/*		ApplicationContext context = new ClassPathXmlApplicationContext("beans4.xml");
		TestChangeMe beanTest = (TestChangeMe) context.getBean("testChangeMe");
		beanTest.changeMe();*/
		ApplicationContext context = new ClassPathXmlApplicationContext("beans2.xml");
		User user= context.getBean("user", User.class);
		System.out.println(user);
	}
/*		ApplicationContext context = new ClassPathXmlApplicationContext("beans2.xml");
		User user= context.getBean("user", User.class);
		System.out.println(user);

*//*		BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("bean2.xml"));
		User user2 = (User) beanFactory.getBean("user");
		System.out.println(user2.getName().equals("hello"));*//*
	}


	public void testSimpleLoad(){

	}*/
}
